from telegram.ext import Updater, CommandHandler
import logging
import configparser

config = configparser.ConfigParser()
config.read('config.ini')

logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
                    level=logging.INFO)
updater = Updater(config['TELEGRAM']['TOKEN'],request_kwargs={'proxy_url':'socks5h://127.0.0.1:1080'})
dispatcher = updater.dispatcher

def start(bot, update):
    bot.send_message(chat_id=update.message.chat_id, text="I'm a bot, please talk to me!")

start_handler = CommandHandler('start', start)
dispatcher.add_handler(start_handler)

if __name__ == '__main__':
    updater.start_polling()